﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using schedulelist.ORM.domain;

namespace schedulelist.ORM.mapping
{
    public class UserMap : ClassMap<User>
    {
        public UserMap()
        {
            Table("user");
            Id(x => x.Id).GeneratedBy.Native();
            Map(x => x.name);
            Map(x => x.login);
            Map(x => x.pass);
            Map(x => x.email);
            Map(x => x.sex);
            References(x => x.Role, "RoleId");
            References(x => x.Dep, "DepId");
            Map(x => x.cnt_created);
            Map(x => x.cnt_made);
        }
    }
}
